package com.gpy.hospital.cms.controller;

import com.gpy.hospital.cms.pojo.HuiFu;
import com.gpy.hospital.cms.service.IHuiFuService;
import com.gpy.hospital.common.ServerResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author
 * @Date 2020/3/26 14:57
 * @Desc
 **/
@Controller
public class HuiFuController {
    @Autowired
    private IHuiFuService huiFuService;

    @PostMapping("/cms/hui/fu/liu/yan")
    @ResponseBody
    public ServerResponse huiFuLiuYan(HuiFu huiFu) {
        return huiFuService.add(huiFu);
    }


    @GetMapping("/cms/liu/yan/hui/fu/delete")
    @ResponseBody
    public ServerResponse liuyanhuifuDelete(@RequestParam("liuYanId") Integer liuYanId){
        return huiFuService.delete(liuYanId);
    }
}
